]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Connect PopupMenuManager to destroy signal
authorGiovanni Campagna <scampa.giovanni@gmail.com>
Wed, 29 Sep 2010 16:12:38 +0000 (18:12 +0200)
committerDan Winship <danw@gnome.org>
Fri, 1 Oct 2010 16:37:06 +0000 (12:37 -0400)
PopupMenuManager now connects to the destroy signal of PopupMenu, so
that destroying a PopupMenu is now enough for removing it from the
relevant manager. Useful if menu come and go on-the-fly (like in
app views or sidebars).

https://bugzilla.gnome.org/show_bug.cgi?id=630914

js/ui/popupMenu.js

index 89f56e71df81ac3028b80a471aca7725a15bba22..de8de1ecaebb4aacf590b4272de1eed7150399c1 100644 (file)
@@ -678,6 +678,7 @@ PopupMenuManager.prototype = {
             menu:              menu,
             openStateChangeId: menu.connect('open-state-changed', Lang.bind(this, this._onMenuOpenState)),
             activateId:        menu.connect('activate', Lang.bind(this, this._onMenuActivated)),
+            destroyId:         menu.connect('destroy', Lang.bind(this, this._onMenuDestroy)),
             enterId:           0,
             buttonPressId:     0
         };